import React, { Component } from 'react';

class App extends Component {
	sendIdFn (id) {
		this.props.goPageFn(id)
	}
	render () {
		return (
			<div  className="my-list">
				<div className="ml-top">
					<span>—— 热销产品 ——</span>
				</div>
				<ul>
				{
					this.props.prolist.map((item, index) => {
						return (
							<li key={ index } onClick={ this.sendIdFn.bind(this, item._id) }>
								<img alt="www.baidu.com" src={ item.goods_img }/>
								<i>{ item.goods_brand }</i>
								<p>{ item.goods_name }</p>
								<div className="libottom">
									<em>￥{ item.goods_newprice }</em>
									<strong>{ item.goods_zhekou }</strong>
								</div>
							</li>
						)
					})
				}
				</ul>
			</div>
		)
	}
	
}

export default App;
